<!--
  description: isReactive
  @author: GuoSiYue
  date: 2021-11-10
 -->

<template>
    
</template>

<script>
    import { reactive, isReactive, readonly } from 'vue'
    export default {
        name: "isReactive",
        setup() {
            const state = reactive({
                name: 'gsy'
            })
            console.log(isReactive(state));//  -> true

        //    从普通对象创建的只读 proxy
            const plain = readonly({
                name: 'lx'
            })
            console.log(isReactive(plain));// ->false

        //    从响应式 proxy 创建的只读 proxy
            const stateCopy = readonly(state)
            console.log(isReactive(stateCopy));// ->true
        }
    }
</script>

<style scoped>

</style>